<%--
  Created by IntelliJ IDEA.
  User: 19339
  Date: 2022/4/18
  Time: 11:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" import="entity.User" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    request.setCharacterEncoding("UTF-8");
    String name=request.getParameter("uname");
    String password=request.getParameter("pwd");
    if(name.equals("张三")&&password.equals("123")){
        User u=new User();
        u.setName(name);
        u.setPwd(password);
        session.setAttribute("user",u);
        response.sendRedirect("welcome.jsp");
    }
    else response.sendRedirect("login.jsp");
%>
</body>
</html>
